def foo(A):
    def boo(index):
        A[index] = 100

    boo(0)
    print(A)

foo([1, 2, 3, 4])

